Save Configuration

The /actions/saveConfiguration URL saves the device configuration to the non‑volatile memory so that it’ll be preserved if the device reboots or is powered down.

URL

/api/v1/actions/saveConfiguration

HTTP Method

POST

HTTP Request

The request must include the "Content-Length" header with a zero value.

Use the following code snippets to generate the proper format.

cURL:
curl -i -X POST -u "Admin:Admin" -d "" \
    http://10.4.219.229/api/v1/actions/saveConfiguration 
Python:
import requests
import base64
 
def save_config(ip, username, password):
    url = 'http://' + ip + '/api/v1/actions/saveConfiguration'
    cred = username + ':' + password
    cred_encoded = base64.b64encode(cred.encode()).decode()
    headers = {'Authorization': 'Basic ' + cred_encoded}
    response = requests.post(url, headers=headers)
    return response.status_code
 
save_config('10.4.219.229', 'Admin', 'Admin')
PowerShell:
$ip = "10.4.219.229"
$username = "Admin"
$password = "Admin"
 
$URL = "http://{0}/api/v1/actions/saveConfiguration" `
    -f $ip
 
$authHash = [Convert]::ToBase64String( `
    [Text.Encoding]::ASCII.GetBytes( `
    ("{0}:{1}" -f $username,$password)))
 
$response = Invoke-RestMethod -Uri $URL -Method Post `
    -Headers @{Authorization=("Basic {0}" -f $authHash)}
$response | ConvertTo-Json

HTTP Responses

200 OK
409 Conflict – configuration can’t be save due to current device state.

Example

Request:
POST /api/v1/actions/saveConfiguration HTTP/1.1
Host: 10.4.219.229
Content-Length: 0 
Response:
HTTP/1.1 200 OK